#include<func.h>
void * sigfunc(void *p)
{
    long a=*((long*)p);
    printf("I am child thread get num=%ld\n",a);
    
    return (void*)(a+1);
    //pthread_exit((void*)(a+1));
}
int main()
{
    pthread_t pthid;
    long i=1;
    long j=0;
    int ret=pthread_create(&pthid,NULL,sigfunc,&i);
    THREAD_ERR_CHECK(ret,"pthread_create")
    ret=pthread_join(pthid,(void**)&j);
    THREAD_ERR_CHECK(ret,"pthread_join")
    printf("I am main thread,get num=%ld\n",j);
    return 0;
}